<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/sinopac-fn" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>OTP分行平台</title>
<link rel="stylesheet" href="${fn:url('/form/datepicker/jquery-ui-1.9.1.custom.css')}">
<script type="text/javascript" src="${fn:url('/js/jQuery/jquery-1.8.2.min.js')}"></script>
<script type="text/javascript" src="${fn:url('/js/datepicker/jquery.ui.core.js')}"></script>
<script type="text/javascript" src="${fn:url('/js/datepicker/jquery.ui.datepicker.js')}"></script>
<script type="text/javascript" src="${fn:url('/js/jQuery/jquery_DOMWindow.js')}"></script>
<script type="text/javascript" src="${fn:url('/js/tools/formUtil.js')}"></script>
<link rel="stylesheet" href="${fn:url('/form/CSS/tabs.css')}">
<script>
			$(document).ready(function(){
				//輸入日期的popup視窗
				
				$( "#from" ).datepicker({
					dateFormat:"yy-mm-dd",
		            defaultDate: "+1w",
		            changeMonth: true,
		            changeYear: true,
		            showOtherMonths: true,
		            selectOtherMonths: true,
		            numberOfMonths: 1,
		            onClose: function( selectedDate ) {
		                $( "#to" ).datepicker( "option", "minDate", selectedDate );
		            }
		        });
				$( "#to" ).datepicker({
					dateFormat:"yy-mm-dd",
		            defaultDate: "+1w",
		            changeMonth: true,
		            changeYear: true,
		            showOtherMonths: true,
		            selectOtherMonths: true,
		            numberOfMonths: 1,
		            onClose: function( selectedDate ) {
		                $( "#from" ).datepicker( "option", "maxDate", selectedDate );
		            }
		        });

				$( "#from_h" ).datepicker({
					dateFormat:"yy-mm-dd",
		            defaultDate: "+1w",
		            changeMonth: true,
		            changeYear: true,
		            showOtherMonths: true,
		            selectOtherMonths: true,
		            numberOfMonths: 1,
		            onClose: function( selectedDate ) {
		                $( "#to_h" ).datepicker( "option", "minDate", selectedDate );
		            }
		        });
				$( "#to_h" ).datepicker({
					dateFormat:"yy-mm-dd",
		            defaultDate: "+1w",
		            changeMonth: true,
		            changeYear: true,
		            showOtherMonths: true,
		            selectOtherMonths: true,
		            numberOfMonths: 1,
		            onClose: function( selectedDate ) {
		                $( "#from_h" ).datepicker( "option", "maxDate", selectedDate );
		            }
		        });
		        
								
				//2012-11-11增加　後端傳回的錯誤訊息，如不為空值，則顯示。
				if(<s:property value="custIdFlag"/>){
					alert($('#errorMessage_a').val());
				}
				//2012-11-11增加　後端傳回的錯誤訊息，如不為空值，則顯示。
				
				//紀錄查詢的popup視窗 確定btnClick事件  for 管理查詢："紀錄查詢"
				$('#logQuery_form input[name=confirm]').click(function(){
					var f = $('#logQuery_form');
			
					f.prop('action','${fn:url('/Index/chkCustId.action')}');

					f.submit();
				});
				
				//輸入客戶ID的popup視窗 確定btnClick事件  for 申請作業："集團戶管理"、"客戶申請"
				$('#custId_form input[name=confirm]').click(function(){
					var str = "";
					var f = $('#custId_form');
					
					str = $.joinId('#custId01_a', '#custId02_a', '#custId03_a');
					$('#custId_a').val(str);
			
					f.prop('action','${fn:url('/Index/chkCustId.action')}');

					f.submit();
				});
				
				//輸入TOKEN-ESN的popup視窗  確定btnClick事件  for TOKEN管理："暫禁、解禁、註銷"
				$('#tokenESN input[name=confirm]').click(function(){
					var u = $('#token_esn_form');
					
					u.prop('action','${fn:url('/Index/chkCustId.action')}');
					
					u.submit();
				});
				
				//輸入 同步序號、同步驗證碼的popup視窗 確定btnClick事件  for "TOKEN同步"
				$('#tokenSynchronous input[name=synConf]').click(function(){
					console ? console.info('FIXME ...') : alert('FIXME ...');
				});

				//popup視窗 for 申請作業："紀錄查詢"
				$('img.logQuery').click(function(){
					var number = $(this).attr('number');
					$('input[name=function_num]').val(number);
					$.openDOMWindow({ 
				    	windowSourceID: '.logQueryDiv',
				        height:250,  
				        width:400, 
				        overlay:1, 
				        overlayColor: '#A9A9A9',
				        windowPadding:20,
				        modal:1,
				        borderColor:'steelblue',
				        borderSize:'2', 
				        positionLeft:120, 
				        positionTop:-150,
				    });
				});
				
				//輸入客戶ID的popup視窗 for 申請作業："集團戶管理"、"客戶申請"
				$('img.MtypeID').click(function(){
					var number = $(this).attr('number');
					$('input[name=function_num]').val(number);
				    $.openDOMWindow({ 
				    	windowSourceID: '.idDiv',
				        height:110,  
				        width:370, 
				        overlay:1, 
				        overlayColor: '#A9A9A9',
				        windowPadding:20,
				        modal:1,
				        borderColor:'steelblue',
				        borderSize:'2', 
				        positionLeft:120, 
				        positionTop:-150,
				    }); 
				});
				
				//輸入TOKEN-ESN的popup視窗  for TOKEN管理："暫禁、解禁、註銷"
				$('img.tokenMtypeToken').click(function(){
					var number = $(this).attr('number');
					$('input[name=function_num]').val(number);
					//$('#function_num_b').prop('name',number);
					$.openDOMWindow({ 
				    	windowSourceID: '.tokenESNDiv',
				        height:110,  
				        width:350, 
				        overlay:1, 
				        overlayColor: '#A9A9A9',
				        windowPadding:20,
				        modal:1,
				        borderColor:'steelblue',
				        borderSize:'2', 
				        positionLeft:120, 
				        positionTop:-150,
				    }); 
				});
				
				//輸入 同步序號、同步驗證碼的popup視窗  for "TOKEN同步"
				$('img.tokenSynchronousPopup').click(function(){
					var number = $(this).attr('number');
					$('input[name=function_num]').val(number);
					$.openDOMWindow({ 
				    	windowSourceID: '.tokenSynchronousDiv',
				        height:160,  
				        width:300, 
				        overlay:1, 
				        overlayColor: '#A9A9A9',
				        windowPadding:20,
				        modal:1,
				        borderColor:'steelblue',
				        borderSize:'2', 
				        positionLeft:120, 
				        positionTop:-150,
				    }); 
				});
				
				//批次申請
				$('img.batchApply').click(function(){
					var number = $(this).attr('number');
					console ? console.info('FIXME ...') : alert('FIXME ...');
				});
				
				//TOKEN入庫
				$('img.tokenStorage').click(function(){
					var number = $(this).attr('number');
					console ? console.info('FIXME ...') : alert('FIXME ...');
				});
				
				//主管覆核
				$('img.supervisorReconfirm').click(function(){
					var number = $(this).attr('number');
					console ? console.info('FIXME ...') : alert('FIXME ...');
				});
				
				//紀錄查詢
				$('img.logQuery').click(function(){
					var number = $(this).attr('number');
					console ? console.info('FIXME ...') : alert('FIXME ...');
				});
				
				//選擇報表查詢時間及類別 for "報表查詢"
				$('img.rptQuery').click(function(){
					var number = $(this).attr('number');
					$('input[name=function_num]').val(number);
					$.openDOMWindow({ 
				    	windowSourceID: '.rptQueryDiv',
				        height:160,  
				        width:400, 
				        overlay:1, 
				        overlayColor: '#A9A9A9',
				        windowPadding:20,
				        modal:1,
				        borderColor:'steelblue',
				        borderSize:'2', 
				        positionLeft:120, 
				        positionTop:-150,
				    });
				});
			});
			
			
		</script>
</head>
<body>

<!-- popup視窗 "選擇紀錄查詢" Start -->
<div id="logQuery" class="logQueryDiv" style="display: none"><s:form
	id="logQuery_form">
	<s:hidden id="function_num_h" name="function_num" value="function_num" />
	<table>
		<tr>
			<td align="left"><s:label value="請輸入查詢紀錄區間" theme="simple" /></td>
		</tr>
		<tr height="10" />
		<tr>
			<td>
				<label for="from"></label>
				<input type="text" id="from_h" name="from_h"/>
			</td>
			<td>
				<label for="to">至</label>
				<input type="text" id="to_h" name="to_h"/>
			</td> 
		</tr>		
		<tr height="10" />
		<tr align="left">
			<td align="left"><select id="token_id" name="token_id">
				<option value="輸入TOKEN-ESN" id="token">輸入TOKEN-ESN</option>
				<option value="輸入客戶ID" id="cus_id">輸入客戶ID</option>
			</select></td>
			<td align="left"><input type="text" id="token_cust" name="token_cust"
				maxlength="23" size="23"/></td>			
		</tr>
		<tr height="10" />
		<tr align="left">
			<td align="left"><s:label value="請選擇紀錄查詢類別" theme="simple" /></td>
			<td align="left"><select id="record" name="record">
				<option value="異動紀錄" id="chg_record">異動紀錄</option>
				<option value="申請紀錄" id="apply_record">申請紀錄</option>
				<option value="註銷紀錄" id="cancel_record">註銷紀錄</option>
				<option value="驗證紀錄" id="verify_record">驗證紀錄</option>
			</select></td>
			<td><s:hidden name="logQ" id="log_q"></s:hidden></td>
		</tr>
		<tr height="30" />
		<tr align="left">
			<td><input name="confirm" type="button" value="確定" /></td>
			<td><s:submit value="取消" id="btnNo" cssClass="closeDOMWindow"
				theme="simple" /></td>
		</tr>
	</table>
</s:form></div>
<!-- popup視窗 "選擇紀錄查詢" End -->

<!-- popup視窗 "輸入客戶ID" Start -->
<div id="customerID" class="idDiv" style="display: none"><s:form
	id="custId_form">
	<s:hidden id="function_num_a" name="function_num" value="function_num" />
	<table>
		<tr align="left">
			<td align="left"><s:label value="請輸入客戶ID" theme="simple" /></td>
			<td align="left"><s:textfield name="custId01" id="custId01_a"
				cssClass="custId" theme="simple" maxlength="18" size="18" /></td>
			<td>-</td>
			<td align="left"><s:textfield name="custId02" id="custId02_a"
				cssClass="custId" theme="simple" maxlength="1" size="1" /></td>
			<td>-</td>
			<td align="left"><s:textfield name="custId03" id="custId03_a"
				cssClass="custId" theme="simple" maxlength="2" size="2" /></td>
			<td><s:hidden name="custId" id="custId_a"></s:hidden></td>
		</tr>
		<tr height="50"></tr>
		<tr>
			<td><input name="confirm" type="button" value="確定" /></td>
			<td><s:submit value="取消" id="btnNo" cssClass="closeDOMWindow"
				theme="simple" /></td>
		</tr>
	</table>
</s:form></div>
<!-- popup視窗 "輸入客戶ID" End -->

<!-- popup視窗 "選擇報表查詢時間及類別" Start -->
<div id="rptQuery" class="rptQueryDiv" style="display: none"><s:form
	id="rptQuery_form">
	<s:hidden id="function_num" name="function_num" value="function_num" />
	<table>
		<tr align="left">
			<td align="left"><s:label value="請選擇報表查詢區間" theme="simple" /></td>
		</tr>
		<tr height="10" />
		<tr>
			<td>
				<label for="from"></label>
				<input type="text" id="from" name="from"/>
			</td>
			<td>
				<label for="to">至</label>
				<input type="text" id="to" name="to"/>
			</td> 
		</tr>
		<tr height="10" />
		<tr align="left">
			<td align="left"><s:label value="請選擇報表查詢類別" theme="simple" /></td>
			<td align="left"><select id="report_sort" name="report_sort">
				<option value="異常報表" id="unusual_report">異常報表</option>
				<option value="行員作業紀錄" id="work_record">行員作業紀錄</option>
				<option value="TOKEN庫存清單" id="token_list">TOKEN庫存清單</option>
				<option value="驗證失敗被暫禁清單" id="moratorium_list">驗證失敗被暫禁清單</option>
			</select></td>
		</tr>
		<tr height="30" />
		<tr align="left">
			<td><input name="confirm" type="button" value="確定" /></td>
			<td><s:submit value="取消" id="btnNo" cssClass="closeDOMWindow"
				theme="simple" /></td>
		</tr>
	</table>
</s:form></div>
<!-- popup視窗 "選擇報表查詢時間及類別" End -->

<!-- popup視窗 "輸入TOKEN-ESN" Start -->
<div id="tokenESN" class="tokenESNDiv" style="display: none"><s:form
	id="token_esn_form">
	<s:hidden id="function_num_b" name="function_num" value="function_num" />
	<table>
		<tr align="left">
			<td align="left"><s:label value="請輸入TOKEN-ESN" theme="simple" /></td>
			<td align="left"><s:textfield id="token_esn_a" name="token_esn"
				theme="simple" maxlength="16" size="18" /></td>
		</tr>
		<tr height="50"></tr>
		<tr>
			<td><input name="confirm" type="button" value="確定" /></td>
			<td><s:submit value="取消" id="btnNo" cssClass="closeDOMWindow"
				theme="simple" /></td>
		</tr>
	</table>
</s:form></div>
<!-- popup視窗 "輸入TOKEN-ESN" End -->

<!-- popup視窗 "輸入 同步序號、同步驗證碼" Start-->
<div id="tokenSynchronous" class="tokenSynchronousDiv"
	style="display: none"><s:form id="token_sync_form">
	<s:hidden id="function_num_f" name="function_num" value="function_num" />
	<table>
		<tr align="left">
			<td align="left"><s:label value="請輸入TOKEN-ESN為" theme="simple" />
			<font color="red"><s:property value="token_esn" /></font></td>
		</tr>
		<tr>
			<td><s:label value="所產生之" theme="simple" /></td>
		</tr>
		<tr>
			<td align="left"><s:label value="同步序號　" theme="simple" /><s:textfield
				id="token_esn_a" name="token_esn" theme="simple" /></td>
		</tr>
		<tr>
			<td align="left"><s:label value="同步驗證碼" theme="simple" /><s:textfield
				id="synConfCode_a" name="synConfCode" theme="simple" /></td>
		</tr>
		<tr>
			<td align="left"><s:label value="進行同步作業" theme="simple" /></td>
		</tr>
		<tr height="10"></tr>
		<tr>
			<td><input name="synConf" type="button" value="確定" /></td>
			<td><s:submit value="取消" id="btnNo" cssClass="closeDOMWindow"
				theme="simple" /></td>
		</tr>
	</table>
</s:form></div>
<!-- popup視窗 "輸入 同步序號、同步驗證碼" End-->
<div>
<table width="768" align="center">
	<tr>
		<th rowspan="2"><img
			src="${fn:url('/form/images/BankSinoPacLogo.png')}" /></th>
		<td colspan="3" align="right">&nbsp;</td>
	</tr>
	<tr>
		<td width="200" style="margin-bottom: 0px; margin-left: 0px">歡迎使用OTP分行平台</td>
		<td align="left" style="color: red" width="120"><s:property
			value="#session.userName" /></td>
		<td align="right" width="50"><s:a action="">登出</s:a></td>
	</tr>
	<tr align="right">
		<td colspan="4"><s:a action="">個人作業紀錄</s:a></td>
	</tr>
</table>
</div>
<div align="center">
<fieldset style="width: 40%"><legend align="left">申請作業</legend>
<form><s:hidden id="function_num_c" name="function_num"
	value="function_num" />
<table>
	<s:hidden property="action" value="getAction()" />
	<tr>
		<!-- 集團戶管理 -->
		<td><img src="${fn:url('/form/images/groupManagementBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/groupManagementBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/groupManagementBtn.png')}'"
			class="MtypeID" number="1" style="width: 80%; height: 80%" /></td>

		<!-- 客戶申請 -->
		<td><img src="${fn:url('/form/images/customerApplyBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/customerApplyBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/customerApplyBtn.png')}'"
			class="MtypeID" number="2" style="width: 80%; height: 80%" /></td>

		<!-- 批次申請 -->
		<td><img src="${fn:url('/form/images/batchApplyBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/batchApplyBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/batchApplyBtn.png')}'"
			class="batchApply" number="3" style="width: 80%; height: 80%" /></td>
	</tr>
</table>
</form>
</fieldset>
<p />
<fieldset style="width: 40%"><legend align="left">TOKEN管理</legend>
<form><s:hidden id="function_num_d" name="function_num"
	value="function_num" />
<table>
	<tr>
		<!-- 暫禁、解禁、註銷 -->
		<td><img src="${fn:url('/form/images/tempCancelBanBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/tempCancelBanBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/tempCancelBanBtn.png')}'"
			class="tokenMtypeToken" number="4" style="width: 80%; height: 80%" />
		</td>

		<!-- TOKEN同步 -->
		<td><img src="${fn:url('/form/images/tokenSynchronousBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/tokenSynchronousBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/tokenSynchronousBtn.png')}'"
			class="tokenSynchronousPopup" number="5"
			style="width: 80%; height: 80%" /></td>

		<!-- TOKEN入庫 -->
		<td><img src="${fn:url('/form/images/tokenStorageBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/tokenStorageBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/tokenStorageBtn.png')}'"
			class="tokenStorage" number="6" style="width: 80%; height: 80%" /></td>
	</tr>
</table>
</form>
</fieldset>
<p />
<fieldset style="width: 40%"><legend align="left">管理查詢</legend>
<form><s:hidden id="function_num_e" name="function_num"
	value="function_num" />
<table>
	<tr>
		<!-- 主管覆核 -->
		<td><img
			src="${fn:url('/form/images/supervisorReconfirmBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/supervisorReconfirmBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/supervisorReconfirmBtn.png')}'"
			class="supervisorReconfirm" number="7"
			style="width: 80%; height: 80%" /></td>

		<!-- 紀錄查詢 -->
		<td><img src="${fn:url('/form/images/logQueryBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/logQueryBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/logQueryBtn.png')}'"
			class="logQuery" number="8" style="width: 80%; height: 80%" /></td>

		<!-- 報表查詢 -->
		<td><img src="${fn:url('/form/images/rptQueryBtn.png')}"
			onmouseover="this.src = '${fn:url('/form/images/rptQueryBtn01.png')}'"
			onmouseout="this.src = '${fn:url('/form/images/rptQueryBtn.png')}'"
			class="rptQuery" number="9" style="width: 80%; height: 80%" /></td>
	</tr>
</table>
</form>
</fieldset>
</div>
<input type="hidden" id="errorMessage_a" name="errorMessage"
	value="${errorMessage}" />
</body>
</html>